Nowadays, with the progress of semiconductor technology and high-definition image data, an amount of image data to be processed by a device or system is being explosively increased. On the other hand, in performing image processing, it is frequently necessary to temporarily retain intermediate image data in the progress of processing.
In an image processing device, generally the image data is stored in an internal buffer or an external memory through a memory interface or a bus. For example, in the case that a full hi-vision image of 30 bits per pixel, of which 60 images are transmitted per second, is processed while intermediate image data of three screens per one full hi-vision screen is stored in the memory, a data transfer capability of 1920 (pixel)×1080 (pixel)×60 (images)×30 (bit)×3 (screen)×2 (times (read, write))=about 22.4 Gbit/sec and a memory capacity of 1920 (pixel)×1080 (pixel)×30 (bit)×3 (screen)=about 186 Mbits are required, and an actual circuit is hardly constructed. Therefore, it is necessary to reduce the amount of data stored in the memory.
A method for performing encoding processing to the image data is used as one of data amount reducing methods. Conventionally, in the encoding method, there are PCM (Pulse Code Modulation) and DPCM (Differential Pulse Code Modulation).
The PCM is a technique of sampling a signal at constant time intervals to quantize the signal into an integral value having the defined number of bits. Although originally the PCM is a method for converting an analog signal into a digital signal, the PCM can also be used to compress digital data. The DPCM is a prediction encoding technique in which the sampled value is not directly encoded but a difference between the sampled value and a signal value of a predicted image is encoded. Adaptive DPCM (ADPCM) technique in which a quantization step is adaptively changed using information on a degree of complexity of a local image is also proposed as an improved DPCM technique.
Additionally, various image compression technologies are proposed. For example, variable length coding methods such as Huffman coding is adopted as an invertible transform to some of various compression techniques, and a complicated processing technology in which an orthogonal transform typified by DCT (Discrete Cosine Transform) is used is adopted to an image compression algorithm, such as JPEG and MPEG, which is aimed at a high compression ratio.
In image compression for a frame memory, it is necessary to ensure a visually-high-quality image and to perform compression or decompression processing at the high compression ratio in real time. In order to satisfy the demand, the inventors developed an encoding method, in which the encoding processing is performed while the PCM and the DPCM are switched according to a difference value between a pixel and an adjacent pixel, as a fixed length compression method for each pixel (see Patent Document 1).
In the technology disclosed in Patent Document 1, an error is increased in a place where a visual sensitivity of human eyes is low, namely, a place where the difference between the pixel and the adjacent pixel is large, and the error is decreased in a place where the visual sensitivity of human eyes is high, namely, a place where the difference between the pixel and the adjacent pixel is small, thereby implementing the high-quality image compression.